<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $title="requirejs with demo";
        $array["title"]=$title;
        $array["cont"]="hello world";
        $this->assign($array);
        $this->display();
    }

    public function test(){
        $data=array();
        $data["name"]=I('post.name',"wong");
        $data["age"]=I('post.age',"28");
        $data['status'] = 1;
        $data['info'] = 'info';
        $data['size'] = 9;
        $this->ajaxReturn($data,'JSON');
    }

    public function person()
    {
        import("lib.Person", APP_VENDOR_PATH, ".php");
        $person = new \Person("wong", "27");
        echo $person->sayHello();
        trace($person->sayHello());
    }
}